﻿@model HomePageNewsItemsModel
@using Nop.Core.Domain.Catalog;
@using Nop.Core.Infrastructure;
@using Nop.Services.Catalog;
@using Nop.Web.Models.News;
@if (Model.NewsItems.Count > 0)
{
    <div class="newslist-homepage">
        <div class="page-title">
            <div class="title">
                @T("News")
            </div>
            <div class="rss">
                <a href="@Url.RouteUrl("NewsRSS", new { languageId = Model.WorkingLanguageId })">
                    <img title="@T("News.RSS.Hint")" src="@Url.Content("~/content/images/icon_rss.gif")" alt="@T("News.RSS")" /></a>
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="newsitems">
            @foreach (var item in Model.NewsItems)
            {
                <div class="item">
                    <a class="newstitle" href="@Url.RouteUrl("NewsItem", new { newsItemId = item.Id, SeName = item.SeName })">
                        @item.Title</a> <span class="newsdate">-
                            @item.CreatedOn.ToString("D")
                        </span>
                    <div class="newsdetails">
                        @Html.Raw(item.Short)
                    </div>
                    <a href="@Url.RouteUrl("NewsItem", new { newsItemId = item.Id, SeName = item.SeName })" class="readmore">
                        @T("News.MoreInfo")</a>
                </div>
            }
            <div class="viewall">
                <a href="@Url.RouteUrl("NewsArchive")">
                    @T("News.ViewAll")</a>
            </div>
        </div>
    </div>

}